Skip to content

Conversation

@jordan-powers
Copy link
Contributor

This patch builds on the work in #113757, #122999, #124594, #125529, and #125709 to natively store array offsets for scaled float fields instead of falling back to ignored source when synthetic_source_keep: arrays.

@jordan-powers jordan-powers added >enhancement auto-backport Automatically create backport pull requests when merged test-full-bwc Trigger full BWC version matrix tests :StorageEngine/Mapping The storage related side of mappings v8.19.0 v9.1.0 labels Mar 27, 2025
@jordan-powers jordan-powers requested a review from martijnvg March 27, 2025 15:58
@jordan-powers jordan-powers self-assigned this Mar 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @jordan-powers, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@jordan-powers jordan-powers force-pushed the offset-encoding-scaled-float branch from 11f898f to ba8e223 Compare March 27, 2025 16:14
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits, LGTM 👍


@Override
protected void minimalMapping(XContentBuilder b) throws IOException {
b.field("type", "scaled_float").field("scaling_factor", 10.0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe turn the scaling factor into a constant here?


@Override
protected String getFieldTypeName() {
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this return null here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, because minimalMapping(...) gets overwritten here. So actually this method should never be invoked. Maybe add an assert false here? So it fails quick if this gets invoked?


@Override
protected void minimalMapping(XContentBuilder b) throws IOException {
b.field("type", "scaled_float").field("scaling_factor", 10.0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe turn the scaling factor into a constant here?

@jordan-powers jordan-powers enabled auto-merge (squash) March 28, 2025 18:28
@jordan-powers jordan-powers merged commit 71e74bd into elastic:main Mar 28, 2025
16 of 17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 125793

@jordan-powers
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
…source (elastic#125793)

This patch builds on the work in elastic#113757, elastic#122999, elastic#124594, elastic#125529, and 
elastic#125709 to natively store array offsets for scaled float fields instead of
falling back to ignored source when synthetic_source_keep: arrays.
elasticsearchmachine pushed a commit that referenced this pull request Mar 28, 2025
…source (#125793) (#125891)

This patch builds on the work in #113757, #122999, #124594, #125529, and
#125709 to natively store array offsets for scaled float fields instead of
falling back to ignored source when synthetic_source_keep: arrays.

(cherry picked from commit 71e74bd)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
@jordan-powers jordan-powers deleted the offset-encoding-scaled-float branch June 12, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending >enhancement :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine test-full-bwc Trigger full BWC version matrix tests v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants